<template>
  <div class="talte">
    <div class="titlerouter">
      <RouterLink :to="{ name: 'StuDemo60' }" active-class="active">首页</RouterLink>
      <RouterLink to="/Sonroutre1" active-class="active">新闻</RouterLink>
      <RouterLink to="/Sonrouter2" active-class="active">关于</RouterLink>
    </div>
    <div class="count">
      <RouterView></RouterView>
    </div>
  </div>
</template>

<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
</script>

<style lang="scss" scoped>
.active {
  background-color: rgba(205, 56, 15, 0.616);
  color: white;
  font-weight: 600;
}
.titlerouter {
  display: flex;
  a {
    background-color: #949292;
    color: white;
    width: 80px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    text-decoration: none;
    margin: 0 10px;
  }
  .active {
    background-color: rgba(31, 164, 71, 0.603);
    color: rgba(233, 151, 9, 0.982);
  }
}
</style>
